import request from '@/utils/request'

/**
 * 公司分页查询
 * @param {查询条件} data
 */
export function getCompanyPageList(data) {
  return request({
    url: 'baseFrame/company/pageList',
    method: 'post',
    data: data,
  })
}

export function getCompanyTreeSelectList(data){
    return request({
        url: 'baseFrame/company/treeSelectList',
        method: 'post',
        data: data,
    })
}



/**
 * 新增公司
 * @param data
 */
export function addCompany(data) {
  return request({
    url: 'baseFrame/company/add',
    method: 'post',
    data: data,
  })
}

/**
 * 修改公司
 * @param data
 */
export function modifyCompany(data) {
  return request({
    url: 'baseFrame/company/modify',
    method: 'post',
    data: data,
  })
}

export function changeCompanyState(data) {
    return request({
        url: 'baseFrame/company/changeState',
        method: 'post',
        data: data,
    })
}


/**
 * 获取公司详情
 * @param {Id}
 */
export function getCompanyDetail(id) {
  return request({
    url: 'baseFrame/company/detail/' + id,
    method: 'get'
  })
}

/**
 * 删除公司
 * @param {主键} pid
 */
export function delCompany(data) {
  return request({
    url: 'baseFrame/company/delete',
    method: 'post',
    data:data
  })
}

